//
// Created by ✎﹏ℳ๓独赏 ☆独醉 on 2023/3/2.
//
#include <stdio.h>
#include <string.h>
int main(){
    int i,j;
    scanf("%d",&i);
    int arr[i];
    memset(arr,0,sizeof arr);
    for(j=0;j<i;j++){
        if(j<2){
            arr[j] = 1;
        }else{
            arr[j] = arr[j-1] + arr[j-2];
        }
    }
    printf("%d\n",sizeof arr/sizeof(int));
    for(i=0;i<sizeof(arr)/sizeof(int);i++){
        printf("%d ",arr[i]);
    }
    return 0;
}